<cfcomponent output="false">
	
	<!--- --->
	
	<cffunction name="getUserByID" access="public" output="false" returntype="query">
		<cfargument name="id" required="true" />
		
		<cfset var local = {} />
		
		<cfif arguments.id eq "" or arguments.id eq "-1">
			<cfset local.getUserByID = query(
				id:[],
				first_name:[],
				middle_name:[],
				last_name:[],
				street_1:[],
				street_2:[],
				city:[],
				state_id:[],
				zip:[],
				email:[]
			) />
		<cfelse>
			<cfquery name="local.getUserByID" datasource="fundrdb" cachedwithin="#createTimespan(0,0,0,2)#">
				select 
				id,
				first_name,
				middle_name,
				last_name,
				street_1,
				street_2,
				city,
				state_id,
				zip,
				email
				from user where id = #application.q.queryID(arguments.id)#
				and active = 1
			</cfquery>
		</cfif>

		<cfreturn local.getUserByID />
		
	</cffunction>
	
	<!--- --->
	
	<cffunction name="getUserByEmail" access="public" output="false" returntype="query">
		<cfargument name="email" required="true" />
		
		<cfset var local = {} />
		
		<cfquery name="local.getUserByID" datasource="fundrdb" cachedwithin="#createTimespan(0,0,0,2)#">
			select 
			id,
			first_name,
			middle_name,
			last_name,
			prefix_id,
			suffix_id,
			mail_street_1,
			mail_street_2,
			mail_city,
			mail_state_id,
			mail_zip,
			email,
			password
			from user where email = #application.q.queryID(arguments.email)#
			and active = 1
		</cfquery>

		<cfreturn local.getUserByID />
		
	</cffunction>
	
	<!--- --->

</cfcomponent>